<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选项卡</title>
    <style type="text/css">
        body{
            margin: 0;
        }
        .tab {
            width: 800px;
            background-color: #f7f7f7;
            border-radius: 50px;
            margin: 50px auto 0px;
            font-size: 0px;
            text-align: center;
            padding: 5px 0px;
        }
        .tab span {
            /* border: 1px solid red; */
            height: 40px;
            display: inline-block;
            padding: 0px 40px;
            line-height: 40px;
            font-size: 16px;
            border-radius: 40px;
        }
        .tab span i {
            width: 26px;
            height: 26px;
            /* border: 1px solid red; */
            display: inline-block;
            vertical-align: middle; /*行内居中，只针对行内块级元素有效 */

        }
        .tab span i.icon1{
            background-size: 26px;
            background-repeat: no-repeat;
            background-image: url(images/fetus.png);
        }
        .tab span i.icon2{
            background-size: 26px;
            background-repeat: no-repeat;
            background-image: url(images/fetus.png);
        }
        .tab span i.icon3{
            background-size: 26px;
            background-repeat: no-repeat;
            background-image: url(images/fetus.png);
        }
        .tab span i.icon4{
            background-size: 26px;
            background-repeat: no-repeat;
            background-image: url(images/fetus.png);
        }
        .tab span i.icon5{
            background-size: 26px;
            background-repeat: no-repeat;
            background-image: url(images/fetus.png);
        }
        .tab span.current{
            background-color: #fe94a9;
            color: #fff;
        }
    </style>
</head>
<body>
    <div class="tab">
         <span><i class="icon1"></i>备孕期间</span>
         <span class="current"><i class="icon2"></i>怀孕</span>
         <span><i class="icon3"></i>0-1岁</span>
         <span><i class="icon4"></i>1-2岁</span>
         <span><i class="icon5"></i>2-3岁</span>
    </div>
</body>
</html>